/**
* Stream Actions
* ============================================================================
*/

.stream-select-all-notice {
  background: @sidebar-bg-color;
  border: 1px solid #e7d796;
  margin: 0 -1px -1px;
  position: relative;
  z-index: 2;

  > div {
    background-color: #fffdf7;
    text-align: center;
    padding: 3px 10px;

    a {
      margin-left: 0.5em;
    }
  }
}

/**
* Stream / Group List
* ============================================================================
*/

.stream-content .processing-issues {
  padding-left: 0;
  font-size: 14px;
  font-weight: 400;
  padding: 10px 20px 8px;

  // TODO(ckj) make this a component-level option
  &.alert-error {
    .icon-alert {
      opacity: 1;
      color: #f2261e;
      margin-top: 1px;

      &:before {
        content: '\E906';
      }
    }
  }

  &.alert-info {
    .icon {
      display: inline-block;
    }
  }

  .pull-right {
    margin-top: -5px;
  }
}

.group-list,
.similar-list,
.event-list {
  background: #fff;
  border: 1px solid @trim;
  border-top: 1px solid @trim;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.03);
  border-radius: 0 0 3px 3px;
  // position: relative;
}

.group-list {
  .group {
    .flex;
    .flex.flex-vertically-centered;
  }
}

// .similar-list is used in a tab in an Issue
.group-list,
.events,
.similar-list,
.event-list {
  .list-unstyled;

  .group {
    color: @gray-dark;
    position: relative;
    margin: 0;
    border-bottom: 1px solid @trim;
    padding-right: 10px;
    background: #fff;
    .transition(all 0.4s ease-in-out);

    &.hoverable {
      cursor: pointer;
      .transition(all 0s ease-in-out);

      &:hover {
        background-color: @white-dark;
      }
    }

    &.isUnprocessed {
      background: lighten(@purple-light, 30%);

      strong.unprocessed-hint {
        background: @purple-light;
        color: white;
        padding: 2px 6px;
        border-radius: 2px;
      }
    }

    &.selected {
      background: lighten(@blue, 20);
      box-shadow: inset 0 1px 0 rgba(52, 60, 69, 0.08);

      .event-details:after {
        background: @blue;
      }
    }

    &.hasSeen {
      h3 {
        a {
          font-weight: 400;
        }
      }
    }

    &.isResolved {
      h3 {
        text-decoration: line-through;
        color: @gray;
      }
    }

    &.updated {
      background: #fffff8;
      color: #786e43 !important;
      border-color: #eceade;

      a {
        color: darken(#786e43, 5) !important;
      }

      .event-details:after {
        position: absolute;
        content: '';
        top: -1px;
        bottom: -1px;
        left: -1px;
        width: 3px;
        z-index: 100;
        .transition(all 0.2s ease-in-out);
        background: @yellow;
      }
    }

    &:first-child {
      .event-cell {
        border-top: 0;
      }
    }

    &:last-child {
      border-bottom-color: transparent;
      border-radius: 0 0 3px 3px;

      .event-cell {
        border-bottom: 1px solid #e9ebec;
      }

      .event-details {
        border-radius: 0 0 0 4px;
      }

      .event-users {
        border-radius: 0 0 4px 0;
      }
    }
  }

  .deploy {
    background: lighten(#f8f9fa, 1.25);
    font-size: 12px;
    text-align: center;
    border-bottom: 1px solid #e9ebec;
    padding: 5px 0;
  }

  .checkbox {
    position: absolute;
    left: 40px;
    top: 21px;
  }

  .event-details {
    padding: 12px 0 8px 24px;

    .event-extra {
      line-height: 1.1;
    }

    .event-extra {
      color: @gray;
    }

    .event-extra {
      ul {
        .list-unstyled;
        margin-left: -9px;
        .clearfix;

        li {
          float: left;
          margin: 0 0 5px 9px;
          font-size: 12px;
          line-height: 1;
          border-right: 1px solid lighten(@trim, 6);
          padding-right: 9px;
          height: 12px;

          &:last-child {
            border: 0;
            padding: 0;
          }

          a {
            display: block;
            color: lighten(@gray, 10);

            &:hover {
              color: @gray;
            }
          }

          .icon {
            margin-right: 4px;
            font-size: 10px;
          }

          .tag-label {
            margin-right: 4px;
          }
        }
      }
    }

    .event-meta {
      font-size: 80%;
      margin-top: 6px;
      clear: both;
    }

    p {
      line-height: 1.4;
      color: #79858c;
      margin-bottom: 0;
    }

    h3 a,
    p {
      display: block;
      max-width: 100%;
      text-overflow: ellipsis;
      white-space: nowrap;
      overflow: hidden;
    }

    .in-release {
      color: #767d81;
      display: inline-block;
      padding: 2px 4px;
      border-radius: 3px;
      font-weight: 600;
      font-size: 80%;
      margin-left: 8px;
      border: 1px solid #e1e8ec;
    }
  }

  .event-graph,
  .event-users,
  .event-count {
    line-height: 24px;
  }

  .event-graph {
    .barchart {
      height: 24px;
    }
  }

  .event-users,
  .event-count {
    span {
      .stream-count;
      .transition(all linear 0.3s);

      &.ng-update {
        background: rgba(255, 252, 82, 0.75);
        opacity: 1;
        border-radius: 4px;
        color: #111;
      }
    }
  }

  &.group-list-small {
    margin: -1px;
    line-height: 16px;

    .event-details {
      padding-left: 20px;

      &:after {
        left: -1px;
      }
    }

    .group:last-child {
      border: 0;
    }
  }

  .severity {
    padding-top: 35px;
  }
}

// stop from accidentally clicking event title
.similar-list .event-details h3 a {
  display: inline-block;
}

.group-list-empty {
  padding: 40px;
  text-align: center;
}

.app-icon {
  width: 28px;
  height: 28px;
  background: url(../images/logos/empty-app-icon-180x180.png) center no-repeat;
  margin-right: 8px;
  display: inline-block;
  background-size: contain;
  vertical-align: middle;
  border-radius: 6px;
  box-shadow: 0px 0px 2px #e3e3e3;
}

/**
 * Awaiting Events - Stream First Run Experience
 * ============================================================================
 */

.awaiting-events {
  padding: 10px 20px 30px;

  .wrap {
    position: relative;
    max-width: 740px;
    margin: 0 auto;
    padding: 60px 0 10px 260px;
    font-size: 18px;
    min-height: 260px;
  }

  .robot {
    position: absolute;
    left: 0;
    top: 30px;
    width: 220px;
    height: 260px;
    background: url(../images/spot/sentry-robot.png);
    background-size: cover;

    .eye {
      display: block;
      .square(12px);
      border-radius: 12px;
      position: absolute;
      top: 70px;
      left: 82px;
      transform: translateZ(0);

      -webkit-animation: blink-eye 0.6s infinite;
      -moz-animation: blink-eye 0.6s infinite;
      -o-animation: blink-eye 0.6s infinite;
      animation: blink-eye 0.6s infinite;
    }
  }

  .strikethrough {
    text-decoration: line-through;
  }
}

@-webkit-keyframes blink-eye {
  0% {
    background: @red;
    box-shadow: 0 0 10px @red;
  }

  50% {
    background: #4a4d67;
    box-shadow: none;
  }

  100% {
    background: @red;
    box-shadow: 0 0 10px @red;
  }
}

@-moz-keyframes blink-eye {
  0% {
    background: @red;
    box-shadow: 0 0 10px @red;
  }

  50% {
    background: #4a4d67;
    box-shadow: none;
  }

  100% {
    background: @red;
    box-shadow: 0 0 10px @red;
  }
}

@-o-keyframes blink-eye {
  0% {
    background: @red;
    box-shadow: 0 0 10px @red;
  }

  50% {
    background: #4a4d67;
    box-shadow: none;
  }

  100% {
    background: @red;
    box-shadow: 0 0 10px @red;
  }
}

@keyframes blink-eye {
  0% {
    background: @red;
    box-shadow: 0 0 10px @red;
  }

  50% {
    background: #4a4d67;
    box-shadow: none;
  }

  100% {
    background: @red;
    box-shadow: 0 0 10px @red;
  }
}

/**
* Issue list
* ----------------------------------------------------------------------------
* Initial step in renaming .group-list & .group to .issue-list & .issue. This
* will eventually live in shared-components.less.
* ============================================================================
*/

.issue-list {
  padding: 0;

  .issue {
    h3 {
      em {
        font-style: normal;
        font-size: 14px;
        color: @60;
        font-weight: normal;
      }
    }

    &.isResolved {
      h3 {
        text-decoration: line-through;
        color: @gray;
      }
    }

    h3 {
      font-size: 16px;
      margin: 0;
    }

    .event-extra {
      padding-left: 20px;
      overflow: hidden;
      white-space: nowrap;
      text-overflow: ellipsis;
      color: @gray;

      > span {
        font-size: 13px;
        color: @gray;
        margin-right: 10px;
      }

      a {
        color: @gray;
        font-weight: bold;

        &:hover {
          color: darken(@gray, 20);
        }
      }
    }

    .icon-comments {
      font-size: 12px;
      position: relative;
      top: 1px;
      margin-right: 3px;
    }

    .more-menu {
      .more-menu-toggle {
        color: @gray-light;
        display: inline-block;
        height: 24px;
        margin-top: 6px;

        &:hover {
          color: @gray;
        }
      }

      .dropdown-menu {
        padding: 0;
        min-width: 0;
        width: 132px;
        left: -110px;
        top: -64px;
        .clearfix;

        li {
          display: inline-block;
          width: 44px;
          height: 44px;
          position: relative;

          a {
            display: block;
            padding: 0;
            text-align: center;
            height: 44px;
            line-height: 46px;
          }

          &:after {
            display: block;
            content: '';
            position: absolute;
            top: 12px;
            bottom: 12px;
            right: 0;
            width: 1px;
            background: darken(#f1f2f3, 4);
          }

          &:first-child {
            a {
              border-radius: 2px 0 0 2px;
            }
          }

          &:last-child {
            &:after {
              display: none;
            }

            a {
              border-radius: 0 2px 2px 0;
            }
          }
        }

        &:before {
          top: auto;
          bottom: -9px;
          left: 107px;
          border-bottom: none;
          border-top: 9px solid rgba(52, 60, 69, 0.45);
        }

        &:after {
          top: auto;
          bottom: -8px;
          left: 108px;
          border-bottom: none;
          border-top: 8px solid #fff;
        }
      }

      &.open {
        .more-menu-toggle {
          color: @gray-dark;
        }
      }
    }

    .event-graph {
      width: 125px;
      position: absolute;
      right: 40px;
      top: 20px;

      .barchart {
        height: 24px;
      }
    }

    .more-menu-container {
      position: absolute;
      width: 20px;
      right: 14px;
      top: 13px;
    }

    &.with-graph {
      position: relative;
      padding-right: 180px;
    }

    &:last-child {
      border-bottom: 0;
    }
  }
}

.stream-count {
  font-size: 20px;
}

/**
* Stream Columns
* ============================================================================
*/

.stream-row {
  .clearfix();

  .search {
    width: 100%;
    z-index: @zindex-sticky-bar + 1;
  }

  .toggle-stream-sidebar {
    width: 50px;
    margin-left: 5px;
    height: 40px;
    text-align: center;
    padding: 8px;

    &:focus,
    &:active {
      box-shadow: 0;
    }

    .icon-filter {
      font-size: 19px;
    }
  }

  .stream-content,
  .stream-sidebar {
    float: left;
    .transition(all 0.2s ease-in-out);
  }

  .stream-content {
    width: 100%;
  }

  .stream-sidebar {
    width: 0;
    height: 0;
    overflow: hidden;
    visibility: hidden;
    opacity: 0;
    padding-left: 20px;
    position: absolute;

    .stream-tag-filter {
      margin-bottom: 1em;

      form {
        position: relative;
      }
    }

    h6 {
      color: lighten(@gray, 10);
      margin-bottom: 10px;
    }
  }

  &.show-sidebar {
    .toggle-stream-sidebar {
      .btn-primary;
      box-shadow: inset 0 2px 0 rgba(0, 0, 0, 0.12);
    }

    .stream-content {
      width: 75%;
    }

    .stream-actions-graph-label {
      display: none;
    }

    .stream-sidebar {
      width: 25%;
      visibility: visible;
      opacity: 1;
      height: auto;
      overflow: visible;
      position: static;
    }
  }
}

/**
* Empty Stream/Empty Alert box
* ============================================================================
*/

.alert-box {
  border: 1px solid @trim;
  border-radius: 0 0 2px 2px;
  text-align: center;
  font-size: 22px;
  padding: 48px 0;

  p {
    line-height: 1.2;
    margin: 0 auto 20px;

    &:last-child {
      margin-bottom: 0;
    }
  }

  .icon {
    display: block;
    font-size: 54px;
    color: lighten(@gray, 20);
    opacity: 0.45;
    margin-bottom: 20px;
  }
}

/**
* Stream assignee selector
* ============================================================================
*/
.stream-content .assignee-selector .dropdown-toggle {
  color: rgb(74, 62, 86); // gray4
}

/**
* Responsive small screen
* ============================================================================
*/

@media (max-width: 992px) {
  .search {
    margin-bottom: -1px;
  }

  .stream-actions {
    .stream-actions-count,
    .stream-actions-users {
      font-size: 13px;
    }
  }
}

@media (max-width: 767px) {
  .search {
    width: 100% !important;
  }

  .search-clear-form {
    top: 10px !important;
  }

  .toggle-stream-sidebar {
    display: none;
  }

  .stream-content {
    width: 100% !important;
  }

  .stream-sidebar {
    display: none;
  }

  .stream-actions {
    padding-right: 0;
  }

  .stream-actions .stream-actions-left,
  .group .event-details {
    padding-left: 36px;

    .checkbox {
      left: 33px;
    }
  }

  .group-list .group {
    padding-right: 0;
  }

  .awaiting-events {
    padding: 25px 20px 0px;

    .wrap {
      padding: 0;
      text-align: center;
    }

    .robot {
      position: relative;
      top: 0;
      left: 0;
      margin: 0 auto;
      width: 110px;
      height: 130px;

      .eye {
        .square(6px);
        top: 34px;
        left: 40px;
      }
    }
  }
}
